home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-04-09 | 1.3 KB | 40 lines | [TEXT/MPS ] |
- # FindCIdent -- Find C identifier in standard {CIncludes} headers
- #
- # This script uses John Jeppson's CIncludesCode tool (which comes with
- # the CIncludesTool script) to locate the definition of a C identifier
- # in previously-indexed headers. Use "CIncludesTool -m" to index your
- # {CIncludes} directory. Then add a menu item to the Find Menu as:
- #
- # AddMenu Find "Find C Identifier/ " 'FindCIdent "`Catenate "{Active}.§"`"'
- #
- # When you need to look up an identifier, select it and choose the menu
- # item (command-space for convenience). This script will open the
- # header where the identifier is declared and highlight the first line
- # of its declaration.
- #
- # CIncludesTool was written by John Jeppson, CIS [76174,2007]
- # The source for the tool can be found in MacDev DL8 as CINCLD.SIT
- #
- # 5.4.90 Matt Holiday, CIS [71320,2400]
-
- Set Exit 0
-
- CIncludesCode -v "{1}"
-
- If "{status}"; Echo "### {0} - invalid identifier {1}"; Exit; End
-
- Set x1j "`CIncludesCode -f "{1}"`"
-
- If "{x1j}" == ""; Echo "### {0} - unable to locate identifier {1}"; Exit; End
-
- ( Evaluate "{x1j}" =~ /∂#include <(?+.h)®1>/ ) ∑ Dev:Null
-
- Open "{CIncludes}{®1}" ∑ Dev:Null
-
- If "{status}"; Echo "### {0} - unable to open file {®1}"; Exit; End
-
- Find • "{Active}"
- Find /•≈[¬A-Za-z0-9_]"{1}"[¬A-Za-z0-9_]≈∞/ "{Active}"
-
- Set Exit 1
-